package com.sleep.flowabledemo.server.impl;

import com.sleep.flowabledemo.domain.VacationInfo;
import com.sleep.flowabledemo.server.VacationService;
import jakarta.annotation.Resource;
import lombok.RequiredArgsConstructor;
import org.flowable.engine.HistoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName VacationServiceImpl
 * @Description TODO
 * @Author 郭敖
 * @Date 2024年04月08日 8:44
 * @Version 1.0
 */
@Service
public class VacationServiceImpl implements VacationService {
//    @Resource
//    private RuntimeService runtimeService;
//    @Resource
//    private TaskService taskService;
//    @Resource
//    private HistoryService historyService;
    @Override
    public void addVacationInfo(VacationInfo vacationInfo) {
//        Map<String,Object> variables = new HashMap<>();
//        variables.put("name",vacationInfo.getName());
//        variables.put("reason",vacationInfo.getReason());
//        variables.put("startTime",vacationInfo.getStartTime());
//        variables.put("endTime",vacationInfo.getEndTime());
//        runtimeService.startProcessInstanceByKey("vacationRequest",vacationInfo.getName(),variables);
    }
}
